﻿<controls:ChildWindow x:Class="LEEAAttendanceControl.Views.PunchEdit"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
           xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices"
           xmlns:my="clr-namespace:LEEAAttendanceControl.Web.Services"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="600" Height="370">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Border BorderThickness="2" BorderBrush="#404041" Grid.Row="0" HorizontalAlignment="Center"
                Margin="10,15,10,15">
            <Grid Margin="0,7,0,0" DataContext="{Binding}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="80"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="60"/>
                    <ColumnDefinition Width="80"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>

                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <sdk:Label Content="Shift" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center"
                       Margin="3"/>
                <ComboBox x:Name="ShiftCombo" Grid.Column="1" Grid.Row="0" Width="150" Height="25" Margin="3"
                          DisplayMemberPath="ShiftName" SelectedValuePath="ID"
                          SelectedValue="{Binding ShiftID, Mode=TwoWay}"/>

                <Rectangle Fill="White" Height="2" Grid.Column="0" Grid.Row="1" Margin="0,15,0,15" Grid.ColumnSpan="5"/>

                <sdk:Label Content="Punch IN:" Grid.Column="0" Grid.Row="2" FontSize="13" FontWeight="Bold" Margin="3,5,3,18"
                       Grid.ColumnSpan="5" HorizontalAlignment="Center"/>

                <sdk:Label Content="IN Day:" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Left"
                       VerticalAlignment="Center" Margin="3"/>
                <sdk:DatePicker x:Name="INDatePicker" Grid.Column="1" Grid.Row="3" Width="150" Margin="3"
                                SelectedDate="{Binding ActualIN, Mode=TwoWay}"/>

                <sdk:Label Content="IN Time:" Grid.Column="3" Grid.Row="3" HorizontalAlignment="Left"
                       VerticalAlignment="Center" Margin="3"/>
                <toolkit:TimePicker x:Name="INTimePicker" Grid.Column="4" Grid.Row="3" Width="150" Margin="3"
                                    Value="{Binding ActualIN, Mode=TwoWay}"/>

                <Rectangle Fill="White" Height="2" Grid.Column="0" Grid.Row="4" Margin="0,15,0,15" Grid.ColumnSpan="5"/>

                <sdk:Label Content="Punch OUT:" Grid.Column="0" Grid.Row="5" FontSize="13" FontWeight="Bold" Margin="3,5,3,18"
                       Grid.ColumnSpan="5" HorizontalAlignment="Center"/>

                <sdk:Label Content="OUT Day:" Grid.Column="0" Grid.Row="6" HorizontalAlignment="Left"
                       VerticalAlignment="Center" Margin="3"/>
                <sdk:DatePicker x:Name="OUTDatePicker" Grid.Column="1" Grid.Row="6" Width="150" Margin="3"
                                SelectedDate="{Binding ActualOUT, Mode=TwoWay}"/>

                <sdk:Label Content="OUT Time:" Grid.Column="3" Grid.Row="6" HorizontalAlignment="Left"
                       VerticalAlignment="Center" Margin="3"/>
                <toolkit:TimePicker x:Name="OUTTimePicker" Grid.Column="4" Grid.Row="6" Width="150" Margin="3"
                                    Value="{Binding ActualOUT, Mode=TwoWay}"/>
            </Grid>
        </Border>

        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,25,10">
            <Button x:Name="SaveButton" Content="Save" Width="75" Height="23" Margin="0,0,10,0" Click="SaveButton_Click"/>
            <Button x:Name="CancelButton" Content="Cancel" Width="75" Height="23" Click="CancelButton_Click"/>
        </StackPanel>
    </Grid>
</controls:ChildWindow>